home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9309 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: ??? MsVC 4.0 (NT) Need Instance Handle to DLL?
  5. Date: 29 Feb 1996 21:36:35 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4h5693$s7f@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe8.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 28, 1996 03:22:24 in article <??? MsVC 4.0 (NT) Need Instance Handle
  15. to DLL?>, 'andle@biode.com (Jeffrey C. Andle)' wrote: 
  16.  
  17.  
  18. >Since DllMain () is now an optional procedure and NT doesn't  
  19. >seem to call it anyways when I add one, how do I get the DLL's 
  20. >instance handle?  There must be some linker switch that I am  
  21. >missing which tells VC to link in the DllMain at startup. 
  22. My experience is that NT3.51 and Win95 systems both call DllMain. 
  23. Of course, the docs say it's DllEntryPoint instead.  I recall one  
  24. program I wrote where the latter was called.  I did not have time 
  25. to investigate what was different about that one, but in all my 
  26. other DLL's, DllMain gets called without failure. 
  27.  
  28. But, anyway, if you can't make it work, try GetModuleHandle(). 
  29.  
  30. -- 
  31. Pete Grant 
  32. Kalevi, Inc. 
  33. Software Engineering & development
  34.